package edu.lingnan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 
 * @TableName tb_answer
 */
@TableName(value ="tb_answer")
@Data
public class Answer implements Serializable {
    /**
     * 自增加ID
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(name = "id", value = "自增id，后端生成")
    private Integer id;

    /**
     * 回复
     */
    @ApiModelProperty(name = "answer", value = "回复内容")
    @NotNull(message = "回复内容不能为空")
    private String answer;

    /**
     * 反馈ID
     */
    @ApiModelProperty(name = "feedbackId", value = "需要回复的反馈的id")
    @NotNull(message = "需要回复的反馈的ID不能为空")
    private Long feedbackId;

    /**
     * 回复的时间
     */
    @ApiModelProperty(name = "answerTime", value = "回复时间（不用传，后端生成）")
    private LocalDateTime answerTime;

    /**
     * 回复人id
     */
    @ApiModelProperty(name = "tNum", value = "回复人的学号")
    @NotNull(message = "回复人的学号不能空")
    private String tNum;

    /**
     * 回复人名字
     */
    @ApiModelProperty(name = "tName", value = "回复人名字")
    @NotNull(message = "回复人的姓名不能为空")
    private String tName;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}